let main () =
  begin
    Sdl.init [`EVERYTHING];
    Sdlevent.enable_events Sdlevent.all_events_mask;
    if (Array.length Sys.argv) < 2 then
      Gui.run ()
    else
    begin
      (* Proceed with command line arguments *)
      let usage = Printf.sprintf "Epimapping 3D, A 3D Mapping software, using GTK." in
      let annon _ = () in         
      let spec_list = Arg.align 
        [("-e", Arg.String (Ep.calc_edges 0 "edges.bmp"), "Take file, produce edges.bmp, a edges calculated picture of your image");
	 ("-o", Arg.String (Ep.calc_edges 1 "oilify.bmp"), "Take file, produce oilify.bmp, do a oilify filter on your image")] in
      Arg.parse spec_list annon usage
    end
  end
let _ = main ()

